using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Cpsc481Phone.Gui.MissedEvents
{
    public partial class MissedTxtEvent : UserControl
    {
        Boolean selected = false;
        public MissedTxtEvent()
        {
            InitializeComponent();
        }
        public Boolean isSelected()
        {
            return selected;      
        }
        public void setSelected(bool value)
        {
            selected = value;
            if(selected)
            panel1.BackColor = Color.Blue;
            else
            panel1.BackColor = Color.Black;

        }
        public void setMissedEvent(MissedEnum graphic, String contact, String message)
        {
           if (graphic == MissedEnum.Text)
              pictureBox1.BackgroundImage = global::Cpsc481Phone.Properties.Resources.MissedTextIcon;
           else if (graphic == MissedEnum.Call)
              pictureBox1.BackgroundImage = global::Cpsc481Phone.Properties.Resources.MissedCallIcon;
           else if (graphic == MissedEnum.Voice)
              pictureBox1.BackgroundImage = global::Cpsc481Phone.Properties.Resources.MissedVoiceIcon;
           label3.Text = contact;
           label4.Text = message;
        }


    }
    public enum MissedEnum
    {
       Text, Voice, Call
    }
}
